class PartialsController < ApplicationController

	before_filter :login_required, :only => [ :answers ]

	def answers
		@prayer = Prayer.find(params[:prayer_id])
		@answers = Answer.paginate_by_prayer_id @prayer.id, :page => params[:page], :order => 'id desc'
		@answer = (params[:answer_id].blank?) ? Answer.new : Answer.find(params[:answer_id])
	end

	def edit_prayer
		@prayer = Prayer.find(params[:prayer_id])
	end
end
